package com.example.lol.ui.fragment;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.lol.R;
import com.example.lol.adapter.CommendArticleAdapter;
import com.example.lol.adapter.NewsArticleAdapter;
import com.example.lol.base.BaseFragment;
import com.example.lol.bean.CommendArticleBean;

public class FourFragment extends BaseFragment {

    private RecyclerView mRecyclerView;
    private CommendArticleAdapter commendArticleAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.fragment_four;
    }

    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.recommend_list);
    }

    @Override
    protected void initData() {
        commendArticleAdapter = new CommendArticleAdapter();

        CommendArticleBean t1 = new CommendArticleBean("【天神裁决天使】 4裁决4天神2宗师",
                R.drawable.recommed_img5,R.drawable.card_hero,"虎牙|king亚索");
        commendArticleAdapter.addData(t1);
        CommendArticleBean t2 = new CommendArticleBean("【重装拉夫】 4重装3龙魂3战神",
                R.drawable.recommed_img6,R.drawable.recommend_user_head,"斗鱼|梨落秋溪");
        commendArticleAdapter.addData(t2);
        CommendArticleBean t3 = new CommendArticleBean("【七法龙王】 7魔法师3森林3龙魂",
                R.drawable.recommend_img1,R.drawable.recommend_user_head,"斗鱼|迅哥、雨霖霖、、");
        commendArticleAdapter.addData(t3);
        CommendArticleBean t4 = new CommendArticleBean("【重装神射】 4神射2重装2秘术",
                R.drawable.recommed_img8,R.drawable.left_nav_user_head,"虎牙、无敌李夫人");
        commendArticleAdapter.addData(t4);
        CommendArticleBean t5 = new CommendArticleBean("【决斗宗师】 6决斗2玉剑2宗师",
                R.drawable.recommend_img1,R.drawable.card_hero,"虎牙 宝子");
        commendArticleAdapter.addData(t5);
        CommendArticleBean t6 = new CommendArticleBean("【神盾凯南】 6神盾3森林3腥红",
                R.drawable.recommend_img2,R.drawable.recommend_user_head,"斗鱼|卷子");
        commendArticleAdapter.addData(t6);
        CommendArticleBean t7 = new CommendArticleBean("【神盾霞】 6神盾3森林2裁决",
                R.drawable.recommend_img2,R.drawable.left_nav_user_head,"虎牙|红莲");
        commendArticleAdapter.addData(t7);

    }

    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(commendArticleAdapter);

    }

    @Override
    protected void bindEvent() {

    }
}

